#!/bin/bash
project_name='natfrp-vpn'
cd /opt/${project_name}/;
tunnel=`cat natfrp-tunnel|grep -v "^#"|grep -v '^ '`;


if [[ "${tunnel}" != "" ]];then
        echo "start ${tunnel} services......";
        find logs/ -type f -ctime +30|xargs rm -f ;
        /opt/${project_name}/frpc_linux_arm64 ${tunnel} |tee -a logs/${project_name}_`date +%Y%m%d`.log
fi;